﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CasterDPSMeter
{
    public partial class BonusDamageDialog : Form
    {
        public BonusDamageDialog()
        {
            InitializeComponent();
        }

        public Player Player { get; set; }

        private void ok_Click(object sender, EventArgs e)
        {
            Player.BonusDamage.Holy = Int32.Parse(holy.Text);
            Player.BonusDamage.Fire = Int32.Parse(fire.Text);
            Player.BonusDamage.Nature = Int32.Parse(nature.Text);
            Player.BonusDamage.Frost = Int32.Parse(frost.Text);
            Player.BonusDamage.Shadow = Int32.Parse(shadow.Text);
            Player.BonusDamage.Arcane = Int32.Parse(arcane.Text);
        }

        private void BonusDamageDialog_Load(object sender, EventArgs e)
        {
            holy.Text = Player.BonusDamage.Holy.ToString();
            fire.Text = Player.BonusDamage.Fire.ToString();
            nature.Text = Player.BonusDamage.Nature.ToString();
            frost.Text = Player.BonusDamage.Frost.ToString();
            shadow.Text = Player.BonusDamage.Shadow.ToString();
            arcane.Text = Player.BonusDamage.Arcane.ToString();
        }

        private void SelectAllText(object sender, EventArgs e)
        {
            ((MaskedTextBox)sender).SelectAll();
        }
    }
}
